package high.concurrent.feign;

import high.concurrent.feign.impl.AddressFeignServiceImpl;
import high.concurrent.utils.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @FeignClient("user")要写order服务的服务名
 */
@FeignClient(name = "user", fallback = AddressFeignServiceImpl.class)
public interface AddressFeignService {

    /**
     * 根据地址id查询地址详情
     * @param addressId       地址id
     * @return
     */
    @GetMapping("/api/address/v1/getAddressById")
    JsonData getAddressById(@RequestParam(value = "addressId") Long addressId);
}
